package Cantella::DJabberd::Model::Admin::User;

use Reaction::InterfaceModel::ObjectClass;

class User, which {

  has roles =>
    (
     clearer       => '_clear_roles',
     domain_model   => '_user_store',
     is             => 'rw',
     isa            => 'Cantella::DJabberd::Model::Admin::Role::Collection',
     lazy           => 1,
     orig_attr_name => 'roles',
     required       => 1,
     default        => sub {
       my $rs = shift->_user_store->roles;
       return Cantella::DJabberd::Model::Admin::Role::Collection->new(_source_resultset => $rs );
     },
    );
};

1;
